package com.genia.ba04;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MoAttack {
    private Geli geli;

    public void setGeli(Geli geli){
        this.geli=geli;
    }
    public void cityGateAsk(){
        geli.responseAsk("墨者革离！");
    }

    public static void main(String[] args) {
        //创建spring的容器对象
        String config="applicationContext.xml";
        ApplicationContext ac = new ClassPathXmlApplicationContext(config);
        System.out.println("容器对象的信息========"+ac);
        MoAttack moAttack = (MoAttack) ac.getBean("moAttack");
        moAttack.cityGateAsk();
    }
}